//
//  MGTimer.h
//  MGPublic
//
//  Created by lhongl on 2025/10/11.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger,MGTimerStatus) {

    MGTimerStatusIng, /// 倒计时中

    MGTimerStatusSuspend, /// 暂停

    MGTimerStatusStop, /// 停止

};
@interface MGTimer : NSObject

///
@property (nonatomic, assign, readonly) MGTimerStatus timerStatu;


/// 开始倒计时
/// - Parameters:
///   - timeNum: 计时事件
///   - block: 回调
- (void)startTimerWithSpace:(float)timeNum block:(void(^)(BOOL))block;


/// 恢复 【必须暂停状态】
- (void)resume;

/// 暂停
- (void)suspend;


/// 停止
- (void)stopTimer;

@end

NS_ASSUME_NONNULL_END
